package Date和DateFormat编程题;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Scanner;

public class ScannerInDateAndPrint {
    public static void main(String[] args) throws Throwable{
        Scanner in = new Scanner(System.in);
        System.out.println("Enter Date: (eg.2022-06-08)");
        String date = in.nextLine();
        var sdf = new SimpleDateFormat("yyyy-MM-dd");
        Date target = sdf.parse(date);
        sdf.applyPattern("yyyy年MM月dd日");
        System.out.println(sdf.format(target));
    }
}
